import {
	ref
}
from 'vue'
const list = {
	1: '/static/audio/step1.wav',
	2: '/static/audio/step2.wav',
	3: '/static/audio/step3.wav',
	4: '/static/audio/step4.wav',
	5: '/static/audio/step5.mp3',
	6: '/static/audio/step6.wav',
	7: '/static/audio/step7.wav',
	8: '/static/audio/step8.wav',
	19: '/static/audio/step19.wav',
	27: '/static/audio/step27.wav',
	28: '/static/audio/step28.wav',

}

function useAudioStep() {
	let audio = uni.createInnerAudioContext()

	function playAudio(index) {
		const userInfo = uni.getStorageSync('userInfo')
		if (!userInfo) return
		audio.src = list[index]
		audio && audio.play()
		console.log(index, 'index22222');
	}
	return {
		playAudio
	}
}
export default useAudioStep